//
//  DataPerisitSwift.swift
//  UIScrollView的快速使用
//
//  Created by hongfei tam on 2018/12/23.
//  Copyright © 2018 YQ05. All rights reserved.
//

import UIKit





class DataPerisitSwift: NSObject {

    func writeValuePre() {
       // 1.登陆按钮保存配置信息
        //全局设置
//        let UserNameKey = "name"
//        let PwdKey = "pwd"
//        let RmbPwdKey = "rmb_pwd"
//        let IsFirstLaunch = "ifl"
        
        //设置存储信息
        let userDefault = UserDefaults.standard
        //NSString类型
        userDefault.set("hangge.com", forKey: "NSString")
        //_ = userDefault.object(forKey: "NSString") as! NSString
        
//        UserDefaults.standardUserDefaults.setObject(nameField.text, forKey: "UserNameKey")
//        UserDefaults.standardUserDefault.setObject(self.pwdField.text, forKey: "PwdKey")
//        UserDefaults.standardUserDefaults().setBool(self.rembSwich.on, forKey: "RmbPwdKey")
        //设置同步
        UserDefaults.standard.synchronize()
        
        
        let swstr = userDefault.object(forKey: "NSString") as! NSString
        
        print("点击了显示评论按钮 %@",swstr)
    }
    
    
}



